#!/bin/sh
echo "convert_SMW_to_return ing~~"
top[0]=002203
top[1]=002204
top[2]=002205
top[3]=002206
top[4]=002207
top[5]=002208
top[6]=002209
top[7]=002210
top[8]=002211
top[9]=002212
top[10]=002213
top[11]=002214
top[12]=002215
top[13]=002216
top[14]=002217
top[15]=002218
top[16]=002219
top[17]=002220
top[18]=002221
top[19]=002222
top[20]=002223
top[21]=002224
top[22]=002225
top[23]=002226
top[24]=002227
top[25]=002228
top[26]=002229
top[27]=002230
top[28]=002231
top[29]=002232
top[30]=002233
top[31]=002234
top[32]=002235
top[33]=002236
top[34]=002237
top[35]=002238
top[36]=002239
top[37]=002240
top[38]=002241
top[39]=002242
top[40]=002243
top[41]=002244
top[42]=002245
top[43]=002246
top[44]=002247
top[45]=002248
top[46]=002249
top[47]=002250
top[48]=002251
top[49]=002252
top[50]=002253
top[51]=002254
top[52]=002255
top[53]=002256
top[54]=002258
top[55]=002259
top[56]=002260
top[57]=002261
top[58]=002262
top[59]=002263
top[60]=002264
top[61]=002265
top[62]=002266
top[63]=002267
top[64]=002268
top[65]=002269
top[66]=002270
top[67]=002271
top[68]=601186
top[69]=601766
top[70]=601898
top[71]=601899
top[72]=601958
i=0
while [ $i -le 72 ]
do
#########
echo "#!/usr/bin/perl
open CONFIG, \"${top[i]}.whole.SMW\";
my \$filename=\"${top[i]}\";" > convert_to_return_plain.PL
#########

	## excel
	#cat convert_to_return_plain.PL > convert_to_return_excel.PL
	
	cat convert_to_return_plain.tample.PL >> convert_to_return_plain.PL
	perl convert_to_return_plain.PL
	#perl convert_to_return_excel.PL
	#mv ${top[i]}.month.return ../
	i=$((i+1))
done

mv *.month.return ../
#mv *.whole.SMW ../
mv all.array.top50 ../